﻿using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using Microsoft.Xna.Framework;
using SomeGame.Actors.Components;
using SomeGame.Actors.Types;
using SomeGame.Zones;

namespace SomeGame {

    public static class BehaviorEngine {

        public static void Update(GameTime gameTime) {

            GameEngine.Player.Update(gameTime, false);
            
            foreach(Actor actor in ZoneManager.CurrentZone.StaticBackgroundActors) {
                actor.Update(gameTime, false);
            }

            foreach(Actor actor in ZoneManager.CurrentZone.StaticBackgroundParticles) {
                actor.Update(gameTime, false);
            }

            foreach(Actor actor in ZoneManager.CurrentZone.BackgroundActors) {
                actor.Update(gameTime, true);
            }

            foreach(Actor actor in ZoneManager.CurrentZone.BackgroundParticles) {
                actor.Update(gameTime, true);
            }

            foreach(Actor actor in ZoneManager.CurrentZone.PlayerLevelActors) {
                actor.Update(gameTime, false);
            }

            foreach(Actor actor in ZoneManager.CurrentZone.PlayerLevelParticles) {
                actor.Update(gameTime, false);
            }

            foreach(Actor actor in ZoneManager.CurrentZone.ForegroundParticles) {
                actor.Update(gameTime, true);
            }

            foreach(Actor actor in ZoneManager.CurrentZone.ForegroundActors) {
                actor.Update(gameTime, true);
            }
        }

    }

}